package top.zhuyougu.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import top.zhuyougu.utils.DateUtils;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author 猪油骨
 * @since 2022-12-10 01:15:43
 */
@Getter
@Setter
@Builder
@TableName("b_comment")
@ApiModel(value = "Comment对象", description = "评论表")
public class Comment implements Serializable {
    private static final long serialVersionUID=1L;
    @ApiModelProperty("ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("评论人ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("文章id")
    @TableField("article_id")
    private Integer articleId;

    @ApiModelProperty("内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("回复人id")
    @TableField("reply_user_id")
    private Integer replyUserId;

    @ApiModelProperty("父id")
    @TableField("parent_id")
    private Integer parentId;

    @ApiModelProperty("评论时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = DateUtils.FORMAT_STRING,timezone="GMT+8")
    private Date createTime;


}
